﻿using HuaHan.WorkTicket.Domain;
using HuaHan.WorkTicket.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace HuaHan.WorkTicket.ServiceContracts
{
    public interface IServiceBase<T> : IApplicationServiceContract 
    {
        [OperationContract]
        [FaultContract(typeof(FaultData))]
        List<T> GetAll();

        [OperationContract]
        [FaultContract(typeof(FaultData))]
        void Add(T modelDTO);

        [OperationContract]
        [FaultContract(typeof(FaultData))]
        void Delete(string id);

        [OperationContract]
        [FaultContract(typeof(FaultData))]
        T GetItemByID(string id);

        [OperationContract]
        [FaultContract(typeof(FaultData))]
        void Update(T modelDTO);
    }
}
